package com.csdj.t301.controller;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;

/**
 * author:cloud
 * date:2021/3/14 0014
 **/
@ControllerAdvice
public class ExceptionController {

    @ExceptionHandler(RuntimeException.class)
    public ModelAndView exception(Exception e){
        e.printStackTrace();
        return new ModelAndView("error");
    }
}
